import LoginView from '@/views/LoginView.vue'
import HomeView from '@/views/home/HomeView.vue'
import WelcomeView from '@/views/WelcomeView.vue'

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView,
  },
  {
    path: '/home',
    name: 'home',
    redirect: '/home/welcome',
    component: HomeView,
    children: [
      {
        path: 'welcome',
        name: 'welcome',
        component: WelcomeView,
      },
      {
        path: 'users',
        component: () => import('@/views/home/users/UsersView.vue'),
      },
      {
        path: 'rights',
        name: 'rights',
        component: () => import('@/views/home/quanxian/RightsView.vue'),
      },
      {
        path: 'roles',
        name: 'roles',
        component: () => import('@/views/home/quanxian/RolesView.vue'),
      },
      {
        path: 'goods',
        name: 'goods',
        component: () => import('@/views/home/goods/GoodsView.vue'),
      },
      {
        path: 'goods/add',
        name: 'goodsadd',
        component: () => import('@/views/home/goods/GoodAdd.vue'),
      },
      // {
      //   path: "goods/add",
      //   name: "goodsadd",
      //   component: GoodAdd,
      // },
      {
        path: 'params',
        name: 'params',
        component: () => import('@/views/home/goods/GoodsParams.vue'),
      },
      {
        path: 'categories',
        name: 'categories',
        component: () => import('@/views/home/goods/Categories.vue'),
      },
      {
        path: 'orders',
        name: 'orders',
        component: () => import('@/views/home/dingdan/OrdersView.vue'),
      },
      {
        path: 'reports',
        name: 'reports',
        component: () => import('@/views/home/shuju/ReportsView.vue'),
      },
    ],
  },
]
export default routes
